<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateEmployeTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_idEmploye}" for="idEmploye" />
                    <h:inputText id="idEmploye" value="#{employeController.selected.idEmploye}" title="#{bundle.CreateEmployeTitle_idEmploye}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_idEmploye}"/>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_login}" for="login" />
                    <h:inputText id="login" value="#{employeController.selected.login}" title="#{bundle.CreateEmployeTitle_login}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_login}"/>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_password}" for="password" />
                    <h:inputText id="password" value="#{employeController.selected.password}" title="#{bundle.CreateEmployeTitle_password}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_password}"/>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_nom}" for="nom" />
                    <h:inputText id="nom" value="#{employeController.selected.nom}" title="#{bundle.CreateEmployeTitle_nom}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_nom}"/>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_prenom}" for="prenom" />
                    <h:inputText id="prenom" value="#{employeController.selected.prenom}" title="#{bundle.CreateEmployeTitle_prenom}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_prenom}"/>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_dateNaissance}" for="dateNaissance" />
                    <h:inputText id="dateNaissance" value="#{employeController.selected.dateNaissance}" title="#{bundle.CreateEmployeTitle_dateNaissance}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_dateNaissance}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_dateDebutContrat}" for="dateDebutContrat" />
                    <h:inputText id="dateDebutContrat" value="#{employeController.selected.dateDebutContrat}" title="#{bundle.CreateEmployeTitle_dateDebutContrat}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_dateDebutContrat}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_dateFinContrat}" for="dateFinContrat" />
                    <h:inputText id="dateFinContrat" value="#{employeController.selected.dateFinContrat}" title="#{bundle.CreateEmployeTitle_dateFinContrat}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_dateFinContrat}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_telephone}" for="telephone" />
                    <h:inputText id="telephone" value="#{employeController.selected.telephone}" title="#{bundle.CreateEmployeTitle_telephone}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_telephone}"/>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_idTypeEmploye}" for="idTypeEmploye" />
                    <h:selectOneMenu id="idTypeEmploye" value="#{employeController.selected.idTypeEmploye}" title="#{bundle.CreateEmployeTitle_idTypeEmploye}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_idTypeEmploye}">
                        <f:selectItems value="#{typeEmployeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateEmployeLabel_idRestaurant}" for="idRestaurant" />
                    <h:selectOneMenu id="idRestaurant" value="#{employeController.selected.idRestaurant}" title="#{bundle.CreateEmployeTitle_idRestaurant}" required="true" requiredMessage="#{bundle.CreateEmployeRequiredMessage_idRestaurant}">
                        <f:selectItems value="#{restaurantController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{employeController.create}" value="#{bundle.CreateEmployeSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{employeController.prepareList}" value="#{bundle.CreateEmployeShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateEmployeIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
